'use strict';

const Controller = require('egg').Controller;

class SearchController extends Controller {
  async index() {
    var {ctx} = this
    var {keyword} = ctx.query
    console.log(keyword);
    const res = await ctx.service.movie.getMovieDetailOrSearch({keyword:keyword});
    console.log(res);
    ctx.body = {
        msg: "detail",
        res
    }
  }
}

module.exports = SearchController;
